import { camelCase, upperFirst } from 'lodash'
import TianzhiJavaGenerator from '.'
import { sep } from 'path'

export function writing(generator: TianzhiJavaGenerator, packageName: string, projectName: string) {
  const className = `${upperFirst(camelCase(projectName))}Application`
  generator.fs.copyTpl(
    generator.templatePath(`springboot-starter${sep}Application.java.ejs`),
    generator._classFilePath(`${className}.java`),
    {
      packageName,
      className,
    }
  )
}
